package com.log.controller;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.core.aspect.Log;

/**
 * zh
 * 2018/8/24  17:07
 */
@Controller
@RequestMapping("Log")
public class LogController {

    private static Logger logger = LoggerFactory.getLogger(LogController.class);

    @Log("进入Log终端")
    @RequiresPermissions("Log")
    @RequestMapping("/")
    public String logView(){
        logger.info("当前系统："+System.getProperty("os.name"));
        if(System.getProperty("os.name").toLowerCase().indexOf("linux") >= 0){
            return "module/Log/logView";
        }
        return "module/Log/logViewWindows";
    }
}
